package com.test;

import java.util.LinkedList;
import java.util.List;

public class Scope {
	public boolean isVisit = false ;
	public List<RuleNode> forAll = null;
	public List<RuleNode> forThis = null;
	
	public void addAllRuleNode(List<RuleNode> rules){
		if(rules==null) return ;
		for(RuleNode rule:rules){
			this.addRuleNode(rule);
		}
	}
	
	public void addRuleNode(RuleNode rule){
		if(rule.forAll){
			if(forAll==null){
				forAll = new LinkedList<RuleNode>();
				
			}
			forAll.add(rule);
		}else{
			if(forThis==null){
				forThis = new LinkedList<RuleNode>();
				
			}
			forThis.add(rule);
		}
		
	}
}
